package com.kaikeba.t31.service;

import com.kaikeba.t31.admin.po.AdminRole;
import com.kaikeba.t31.admin.po.AdminUser;
import com.kaikeba.t31.core.service.ICrudService;

import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author yumingzhi
 * @since 2021-11-14
 */
public interface AdminUserService extends ICrudService<AdminUser> {

    List<AdminRole> selectRoleByUser(Long id);

    /**
     * 根据id锁定记录
     * @param id
     * @return
     */
    int lock(Long id);

    /**
     * 根据名称查询记录
     *
     * @param name
     * @return
     */
    AdminUser getByName(String name);

    boolean saveOrUpdate(AdminUser adminUser);

    /**
     * 查询所有方法
     *
     * @param entity
     * @return
     */
    List<AdminUser> list(AdminUser entity);
}
